<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    const keyA={a:1};
    const keyB={b:2};
    const myObject={
        [keyA]:'aaa',
        [keyB]:'bbb'

    }
    console.log(myObject);// Object {[object Object]: "bbb"}
    //上面代码中，[keyA]和[keyB]得到的都是[object Object]，所以[keyB]会把[keyA]覆盖掉，而myObject最后只有一个[object Object]属性。
    </script>
</body>
</html>